package Java8实战._2_Stream_使用流._2_映射;

import java.util.Arrays;
import java.util.List;

public class _2_流的扁平化3 {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("Hello","World");

        list.stream()
                .map(str -> str.split(""))
                .flatMap((String[] strs) -> Arrays.stream(strs))
                .distinct()
                .forEach(str -> System.out.print(str + " "));
    }


}
